package com.zxdemo.jpa.model;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Transient;
/**   
* @Description: 菜单实体类
* <p>Copyright: Copyright (c) 2017<／p>
* @Package com.zxdemo.jpa.model 
* @author 张翔
* @date 2017年1月19日 下午4:30:26 
* @version V1.0   
*/
@Entity
public class Menu implements Serializable{
	private static final long serialVersionUID = 1L;
	/**
	 * 菜单ID
	 */
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private Long menuId;
	/**
	 * 父级菜单ID，一级菜单为0
	 */
	private Long parentId;
	/**
	 * 父级菜单名称
	 */
	@Transient
	private String parentName;
	/**
	 * 菜单名称
	 */
	private String name;
	/**
	 * 菜单url
	 */
	private String url;
	/**
	 * 授权(多个用逗号分隔，如：user:list,user:create)
	 */
	private String perms;
	/**
	 * 菜单类型  0：目录   1：菜单   2：按钮
	 */
	private Integer type;
	/**
	 * 菜单图标
	 */
	private String icon;
	/**
	 * 排序
	 */
	private Integer orderNum;
	/**
	 * ztree属性
	 */
	@Transient
	private Boolean open;
	
	@Transient
	private List<?> child;
	public Long getMenuId() {
		return menuId;
	}
	public void setMenuId(Long menuId) {
		this.menuId = menuId;
	}
	public Long getParentId() {
		return parentId;
	}
	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}
	public String getParentName() {
		return parentName;
	}
	public void setParentName(String parentName) {
		this.parentName = parentName;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public String getPerms() {
		return perms;
	}
	public void setPerms(String perms) {
		this.perms = perms;
	}
	public Integer getType() {
		return type;
	}
	public void setType(Integer type) {
		this.type = type;
	}
	public String getIcon() {
		return icon;
	}
	public void setIcon(String icon) {
		this.icon = icon;
	}
	public Integer getOrderNum() {
		return orderNum;
	}
	public void setOrderNum(Integer orderNum) {
		this.orderNum = orderNum;
	}
	public Boolean getOpen() {
		return open;
	}
	public void setOpen(Boolean open) {
		this.open = open;
	}
	public List<?> getChild() {
		return child;
	}
	public void setChild(List<?> child) {
		this.child = child;
	}
}
